package com.zhouxiaoge;

import com.zhouxiaoge.ribbon.ExcludeFromComponentScan;
import com.zhouxiaoge.ribbon.MyRibbonConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.web.client.RestTemplate;

/**
 * @author 周小哥
 * mail : gqzmy@outllook.com
 */

@SpringBootApplication
@EnableEurekaClient
@RibbonClient(name = "user-provider-1", configuration = MyRibbonConfiguration.class)
@ComponentScan(excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION, value = ExcludeFromComponentScan.class)})
public class Movie_8081 {

    public static void main(String[] args) {
        SpringApplication.run(Movie_8081.class, args);
    }

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
